<script setup>
import './assets/css/globals.css';
</script>

<template>
  <div class="app-root">
    <header class="app-header">
      <div class="app-header-inner">
        <div class="app-logo">Knowledge App</div>
        <nav class="app-nav">
          <NuxtLink to="/" class="nav-link">首页</NuxtLink>
          <NuxtLink to="/login" class="nav-link">登录</NuxtLink>
          <NuxtLink to="/notes" class="nav-link">笔记</NuxtLink>
          <NuxtLink to="/backup" class="nav-link">备份管理</NuxtLink>
        </nav>
      </div>
    </header>
    <main class="app-main">
      <NuxtPage />
    </main>
  </div>
</template>

<style scoped>
.app-root {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.app-header {
  padding: 10px 16px;
  border-bottom: 1px solid #e5e7eb;
  background: #f9fafb;
  position: sticky;
  top: 0;
  z-index: 10;
}

.app-header-inner {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.app-logo {
  font-weight: 600;
  font-size: 16px;
}

.app-nav {
  display: flex;
  gap: 12px;
}

.nav-link {
  padding: 4px 8px;
  border-radius: 6px;
  color: #4b5563;
  text-decoration: none;
  font-size: 14px;
}

.nav-link.router-link-active {
  background: #111827;
  color: #f9fafb;
}

.app-main {
  padding: 16px;
  max-width: 1200px;
  margin: 0 auto;
}
</style>
